<?php
$from = (($page - 1) * max_news);
$select = 'name,name_rewrite,url_hinh,description';
$table = 'info';
$where = "`delete`=0 AND status=1 AND menu_id LIKE '%,{$idMenu},%'";
$limit = "LIMIT {$from},".max_news;
$list = $tc->list_item($select,$table,$where,$limit);
$total = mysql_num_rows($list);
$view_post .= '<div class="boxleft"><div class="titleleft"></div><div class="titlecenter"><a href="'.$row_menu_one['url'].'">'.$row_menu_one['name'].'</a></div><div class="titleright"></div><div style="clear:both"></div>';
if($total > 1){
	/*$view_post .= $tc->navigator($row_menu_one['url'],$row_menu_one['name'],$row_menu_one['title']);
	$view_post .= '<h1>'.$row_menu_one['title'].'</h1><h2>'.$row_menu_one['metaDescription'].'</h2>';*/
	while($row = mysql_fetch_array($list)){
		$view_post .= '
		<div class="item">
            <a href="'.$row_menu_one['url'].$row['name_rewrite'].'.html"><h2>'.$row['name'].'</h2></a>
			<img src="'.url_detail_thumb_image.$row['url_hinh'].'" alt="'.$row['name'].'" />
			<h5>'.$row['description'].'</h5>
        </div>
		';
	}
	$phantrang = $tc->phantrang($row_menu_one['url'],$page,max_news,'id',$table,$where);
	$view_post .= "<div id=\"phantrang\">{$phantrang}</div>";
}elseif($total==1){
	$row = mysql_fetch_array($list);
	header('location: http://'.$domain.'/'.$row_menu_one['url'].$row['name_rewrite'].'.html');
}else $view_post .= '<div style="padding:20px; height:500px">Thông tin đang được cập nhật...</div>';

$view_post .= '<div style="clear:both; height:8px"></div></div>';